﻿using System;
using System.Device.Location;
using Windows.Devices.Geolocation;

namespace MapDemo
{
    public class CoordinateConverter
    {
        public static GeoCoordinate Convert(Geocoordinate geocoordinate)
        {
            return new GeoCoordinate(
                geocoordinate.Latitude, 
                geocoordinate.Longitude, 
                geocoordinate.Altitude ?? Double.NaN,       //høyde
                geocoordinate.Accuracy, 
                geocoordinate.AltitudeAccuracy ?? Double.NaN, 
                geocoordinate.Speed ?? Double.NaN, 
                geocoordinate.Heading ?? Double.NaN
               );
        }
    }
}
